<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  "use strict";
  const p1 = new Promise((reslove, reject) => {
    setTimeout(() => {
      reslove(`成功了吧`);
    }, 100);
  });
  const p2 = new Promise((reslove, reject) => {
    setTimeout(() => {
      reject(`失败了阿布`);
    }, 1000);
  });
  // Promise.reject()
  // Promise.resolve()

  const res = Promise.allSettled([p1, p2]);
  // 只要有一个成功，就返回成功的值
  const res1 = Promise.all([p1, p2]);
  // 只要一失败成功，就返回失败的值
  console.log(res);
  // 这两个方法是批量出来异步的问题的
</script>

</html>